<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>号码框</title>
<link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/jquery-easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/jquery-easyui/themes/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
<label>
  输入数值
  <input type="text" class="easyui-numberbox" value="100" data-options="min: 0, precision: 2"></label>
<label>
  输入数值
  <input type="text" id="numberbox">
</label>
<script type="text/javascript">
$(function () {
  $("#numberbox").numberbox({
    //允许的最小值
    min: 0,
    //在十进制分隔符之后显示的最大精度，默认值为0
    precision: 1,
    //分割整数组的字符
    groupSeparator: ',',
    //允许的最大值
    max: 999999999,
    //定义numberbox对象的onChange事件的触发函数（参数：新值，旧值）
    onChange: function (var1, var2) {
      console.log("新值：" + var1 + "，旧值：" + var2);
      console.log($(this).numberbox('getValue'));
    }
  });
})
</script>
</body>
</html>